﻿using System.Data.Entity;
using yiCommerce.Core;

namespace yiCommerce.Data.Respository
{
    public class StatusesRepository:IStatusesRepository
    {
        public void GivePointToStatuses(int statusId, int customerId, int point = 1)
        {
            var context = EngineContext.Current.Resolve<DbContext>();
            var sql = string.Format("update statuses set point=point+{1} where id={0}", statusId, point);
            context.Database.ExecuteSqlCommand(sql);
        }
    }
}